<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<h3>Modifica il tuo blog</h3>
<form name="updateBlog" action="./private/UpdateBlog" method="POST">
	Titolo del Blog: <input type="text" name="blogTitle" value="<c:out value="${blog.blogTitle}"/>" class="textinput" />
	Categoria Blog:
	<br><select name="blogCategory" class="textinput">
		<c:forEach var="cat" items="${blogCategoryList}" varStatus="status">
			<option value="${cat.id}"<c:if test="${cat.id==blog.blogCategory}"> selected="selected"</c:if>><c:out value="${cat.name}" /></option>
		</c:forEach>
		</select>
	<br>
	<input type="hidden" name="blogOwner" value="<c:out value="${user.userID}" />" class="textinput" />
	<input type="hidden" name="blogID" value="<c:out value="${blog.blogID}" />" class="textinput" />
	<input type="hidden" name="imgURL" value="<c:out value="${blog.imgURL}" />" class="textinput" />
	
	<input class="submit" type="submit" value="Salva"><small>Press ESC to close</small> 
</form>